package com.symria.server.po;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Temporal;
import javax.persistence.Transient;

import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * Constant entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "CONSTANT")
public class Constant implements java.io.Serializable {

	// Fields

	private Integer id;
	private String contsName;
	private String code;
	private String pcode;
	private String val;
	private Integer lev;
	private String display;
	private Integer sort;
	private String imgPath;
	private List<Constant> list = new ArrayList<Constant>();

	
	
	// Constructors
	@Transient
	public List<Constant> getList() {
		return list;
	}

	public void setList(List<Constant> list) {
		this.list = list;
	}

	/** default constructor */
	public Constant() {
	}

	/** full constructor */
	public Constant(String contsName, String code, String pcode, String val,
			Integer lev, String display, Integer sort, String imgPath) {
		this.contsName = contsName;
		this.code = code;
		this.pcode = pcode;
		this.val = val;
		this.lev = lev;
		this.display = display;
		this.sort = sort;
		this.imgPath = imgPath;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "conts_name", length = 20)
	public String getContsName() {
		return this.contsName;
	}

	public void setContsName(String contsName) {
		this.contsName = contsName;
	}

	@Column(name = "code", length = 20)
	public String getCode() {
		return this.code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	@Column(name = "pcode", length = 20)
	public String getPcode() {
		return this.pcode;
	}

	public void setPcode(String pcode) {
		this.pcode = pcode;
	}

	@Column(name = "val", length = 16)
	public String getVal() {
		return this.val;
	}

	public void setVal(String val) {
		this.val = val;
	}

	@Column(name = "lev")
	public Integer getLev() {
		return this.lev;
	}

	public void setLev(Integer lev) {
		this.lev = lev;
	}

	@Column(name = "display", length = 1)
	public String getDisplay() {
		return this.display;
	}

	public void setDisplay(String display) {
		this.display = display;
	}

	@Column(name = "sort")
	public Integer getSort() {
		return this.sort;
	}

	public void setSort(Integer sort) {
		this.sort = sort;
	}

	@Column(name = "img_path", length = 128)
	public String getImgPath() {
		return this.imgPath;
	}

	public void setImgPath(String imgPath) {
		this.imgPath = imgPath;
	}

}